<%-- 
    Document   : facturaMovil
    Created on : 30-may-2009, 13:06:10
    Author     : Alberto
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" session="false" import="domain.*, planner.*, java.util.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>DOMECO</title>
        <link href="style.css" rel="stylesheet" type="text/css">

             <style type="text/css">@import url(./js/calendar-blue2.css);</style>
        <script type="text/javascript" src="./js/calendar.js"></script>
        <script type="text/javascript" src="./js/calendar-es.js"></script>
        <script type="text/javascript" src="./js/calendar-setup.js"></script>

        <script type="text/javascript">
//inicializo el calendario
window.onload = function() {
  Calendar.setup({
    inputField: "from",
    ifFormat:  "%d/%m/%Y",
    button:     "mas1"
  });

  Calendar.setup({
    inputField: "to",
    ifFormat:  "%d/%m/%Y",
    button:     "mas2"
  });

}
</script>
        


    </head>
    <body>
        <%if (request.getSession(false) != null) {%>
        <table align="center" width="1000" >
            <tr>
                <td>
                    <div id="menu" align="center"><jsp:include page="./menu principal.jsp"></jsp:include></div>
                    <br>

                    <p id="campoAzul" align="center" valign="middle" width="235px"><span id="blanco">Telefonía</span><br></p>
                    <span id="azul"> Nueva Factura de Telefonía móvil</span>
                    <div id="general">
                        <div id="cuenta" align="center" >

                            <table id="tablaa" align="center">
                                <br><br>
                                <tr>
                                    <td align="center">
                                        <div>
                                            <form action="./SubirFacturaMovil" method="post" id="file" name="file" enctype="multipart/form-data">
                                                <span id="rojo">Ruta de la factura:</span><input type="file" name="file" value="Subir archivo" id="file" style="color:#cc0000;"><span id="rojo">(Formato .xls)</span><br><br>
                                                <span id="rojo">Desde: </span><input type="text" id="from" name="from" readonly="readonly"><button name="mas1" id="mas1" class="mas1"></button> <span id="rojo">Hasta: </span><input type="text" id="to" name="to" readonly="readonly"><button name="mas2" id="mas2" class="mas2"></button><br><span id="rojo"> (Formato: dd/mm/aaaa)</span><br><br>
                                                <span id="rojo">Cantidad: <input type="text" name="amount"></span>
                                                <select name="mobile" id="mobile"><br>
                                                    <%
    Userdom u = (Userdom) request.getSession().getAttribute("user");
    Iterator it = new Operations().getMobileContrList(u).iterator();
    while (it.hasNext()) {
        Mobilecontract m = (Mobilecontract) it.next();

                                                    %>
                                                    <option  value="<% out.print(m.getIdMobileContract());%>"><% out.print(m.getMobileNumber());%></option>
                                                    <%
    }
                                                    %>
                                                </select>
                                                <input type="submit" id="subirFactura" value=""><br><br>
                                                <%if (request.getParameter("error").equals("true")) {%>
                                                <span style="color:red">Introduzca todos los datos correctamente, por favor.</span>
                                                <%}%>
                                            </form>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="barraDer">


                            <div id="accesos">
                                <table align="center">
                                    <tr ><td id="campoAzul" align="center" valign="middle" width="235px"><span id="blanco">Datos actuales</span><br></td></tr>
                                </table>

                                <p align="center"><a href="./nuevoContTelefono.jsp" id="azul"><span onmouseover='this.style.color="#FF9900"' onmouseout='this.style.color="#79A9D9"'>A&ntilde;adir telefono</span></a></p>
                                <p align="center"> <a href="./facturaMovil.jsp?error=false" id="azul"><span onmouseover='this.style.color="#FF9900"' onmouseout='this.style.color="#79A9D9"'>A&ntilde;adir factura</span></a> </p>

                            </div>
                            
                        </div>
                    </div>

                    <div id="abajo" align="center"><p>&copy;   Domeco &mdash; Proyecto Informático A&ntilde;o 2009 </p></div>
                </td>
            </tr>
        </table>
        <%} else {%>
        <jsp:forward page="./index.jsp"></jsp:forward>
        <%}%>

    </body>
</html>
